package com.sharesrc.umangadownloader;

import org.jsoup.Connection;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.select.Elements;

public class JsoupTestDrive {
	public static void main(String[] args) {
		new JsoupTestDrive().start();
	}

	private void start() {
		try {
			Connection conn = Jsoup.connect("http://truyen.vnsharing.net/Truyen/SINS?id=3237");
			conn.userAgent("Mozilla/5.0 (Windows NT 6.2; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0");
			conn.header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
			conn.header("Accept-Language", "en-US,en;q=0.5");
			conn.header("Accept-Encoding", "gzip, deflate");
			conn.timeout(0);
			Document doc = conn.get();
			Elements elements = doc.select("#leftside > div:eq(2) > div:eq(1) > div:eq(1) > table");
			System.out.println("elements.toString()\n" + elements.toString());
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
